const KoaRouter=require('koa-router')
const koaCompose=require('koa-compose')
const hello=require('./controller/hello')
const router=new KoaRouter()

module.exports=()=>{
    router.get('/fe',hello.fe)
    router.get('/backend',hello.backend)

    // 合并 component koa 多个中间件函数合并
    return koaCompose([router.routes(),router.allowedMethods()])
}